package br.ufrgs.inf.cwsmart.data;

import java.sql.ResultSet;

import br.ufrgs.inf.cwsmart.exception.FrameworkException;

/**
 * An implementation for the datamart manager.
 * 
 * @author Rodrigo S Lumertz
 *
 */
public class DataMartManagerImpl implements DataMartManager{

	
	/*
	 * (non-Javadoc)
	 * @see br.ufrgs.inf.cwsmart.data.DataMartManager#addData(java.lang.String)
	 */
	@Override
	public void addData(String sql) throws FrameworkException {
		
		DataMartDBConnection.getInstance().getConnection();
		
		// TODO: execute the given sql on the datamart db
		System.out.println("TODO: [framework] execute the given sql on the datamart db.");		
	}

	/*
	 * (non-Javadoc)
	 * @see br.ufrgs.inf.cwsmart.data.DataMartManager#retrieveData(java.lang.String)
	 */
	@Override
	public ResultSet retrieveData(String sql) throws FrameworkException {
		
		DataMartDBConnection.getInstance().getConnection();
		
		// TODO: execute the given sql on the datamart db
		System.out.println("TODO: [framework] execute the given sql on the datamart db and return the result.");
		
		return null;
	}

}
